package com.briup.demo.dao;
import com.briup.demo.bean.Ware;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;

public interface WareMapper {
    @Select("select * from ware")
    List<Ware>selectAll();
    @Insert("insert into ware values(null,#{name},#{nu},#{rebate},#{category_id},#{category_position},#{position})")
    void insert(Ware ware);
    @Update("update ware set id=#{id},name=#{name},nu=#{nu},rebate=#{rebate},category_ide=#{category_id},category_position=#{category_position},position=#{position} where id=#{id}")
    void update(Ware ware);
    @Delete("delete from ware where id=#{id}")
    void delete(Long id);


}
